package com.gaoyubo.service;

import com.gaoyubo.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface UserService {
    //添加或修改
    <S extends User> S save(S s);
    //根据id查询
    Optional<User> findById(Integer id);
    //列表
    List<User> findAll();
    //删除
    void deleteById(Integer id);
    //分页
    Page<User> findAll(Pageable pageable);
    List<User> findByNameLike(String name);
}
